/**
 * Created by Heiliuer on 2018/3/21 0021.
 */
const Koa = require('koa')
const route = require('koa-route')
const app = new Koa()
const main = (ctx,next) => {
    ctx.response.body = 'ajsdlfkjaldk'
    console.log('main')
    next()
}
const about = (ctx,next) =>{
    console.log('about')
    ctx.response.type = 'html'
    ctx.response.body = '<h1>这里是关于</h1>'
    next()
}

app.use(route.get('/',about))
app.use(route.get('/',main))


app.listen(3000)


